define(["jquery","underscoreBase", "marionette", "bootstrap" ], function(\$, _, Marionette, Bootstrap) {

	var MessageView = Marionette.ItemView.extend({
			
			template : _.template(\$('#tpl-message-panel').html()),
			
			ui : {
				dismissBtn : "#dismissBtn",
				alertPanel : '.alert'
			},
		
			events : {
				'click @ui.dismissBtn' : 'removeFromUi'
			},
		
			onRender: function(){
				var that = this;
				setTimeout(function(){ that.removeFromUi()}, 2000);
			},
		
			removeFromUi: function(){
				this.ui.alertPanel.alert('close');
				this.\$el.remove();
				this.close();
			}
			
		});
		
	return MessageView;
});